package com.rgsx.config;

import com.rgsx.vo.ResultVo;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class WebExceptionHandler {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public ResultVo customerException(Exception e) {

        return ResultVo.fail(e);
    }

}

